Efficient Runtime Assertion Checking of Assignable Clauses with Datagroups

نویسندگان

  • Hermann Lehner
  • Peter Müller
چکیده

Runtime assertion checking is useful for debugging programs and specifications. Existing tools check invariants as well as method preand postconditions, but mostly ignore assignable (or modifies) clauses, which specify the heap locations a method is allowed to assign to. A way to abstract from implementation details is to specify assignable clauses using datagroups, which represent sets of concrete memory locations. Efficient runtime checking of assignable clauses with datagroups is difficult because the members of a datagroup may change over time and because datagroups may get very large, especially for recursive data structures. We present the first algorithm to check assignable clauses in the presence of datagroups. The key idea is to compute the set of locations in a datagroup lazily, which requires data structures that reflect when the contents of a datagroup change during the execution of a method. We implemented our approach in a prototypical runtime assertion checker for the Java Modeling Language (Jml); our experiments show that the runtime overhead is moderately small.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

CHASE: A Static Checker for JML's Assignable Clause

This paper presents a syntactic method to check so-called assignable clauses of annotated Java programs. Assignable clauses describe which variables may be assigned by a method. Their correctness is crucial for reasoning about class specifications. The method that we propose is incomplete, as it only makes a syntactic check and it does not take aliasing or expression evaluation into account, bu...

متن کامل

Modular Enforcement of Supertype Abstraction and Information Hiding with Client-Side Checking

Static reasoning tools for object-oriented (OO) languages use supertype abstraction, by verifying calls to methods using the specification associated with the receiver’s static type. Unfortunately, contemporary runtime assertion checkers for OO are inconsistent with such static reasoning tools, since they check assertions in an overly-dynamic way on the supplier side. For method calls, such sup...

متن کامل

A Lesson on Runtime Assertion Checking with Frama-C

Runtime assertion checking provides a powerful, highly automatizable technique to detect violations of specified program properties. This paper provides a lesson on runtime assertion checking with Frama-C, a publicly available toolset for analysis of C programs. We illustrate how a C program can be specified in executable specification language e-acsl and how this specification can be automatic...

متن کامل

Abstraction-guided Runtime Checking of Assertions on Lists

ion-guided Runtime Checking of Assertions on Lists Alex Gyori, Pranav Garg, Edgar Pek, P. Madhusudan University of Illinois at Urbana-Champaign, Urbana, IL, USA {gyori, garg11, pek1, madhu}@illinois.edu Abstract. We investigate ways to specify and check, at runtime, assertions that express properties of dynamically manipulated linked-list data structures. Checking an assertion involving whether...

متن کامل

Effective and Efficient Runtime Assertion Checking for JML Through Strong Validity

Previously, we presented an assertion semantics for JML based on “strong validity” in which an assertion is taken to be valid precisely when it is defined and true. Elsewhere we have shared our positive experiences with the realization and use of this new semantics in the context of ESC/Java2. In this paper, we describe the challenges faced by and the redesign required for the implementation of...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2010